﻿Imports System
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
<Serializable()> Public Class ProjectionCollection
    Inherits System.Collections.CollectionBase
    Private m_SollutionName As String
    Property SollutionName() As String
        Get
            Return Me.m_SollutionName
        End Get
        Set(ByVal value As String)
            Me.m_SollutionName = value
        End Set
    End Property

    ''' <summary>
    ''' 添加集合
    ''' </summary>
    ''' <param name="Project"></param>
    ''' <remarks></remarks>
    Public Sub Add(ByVal Project As Project, ByVal Name As String)
        '初始化参数
        Project.Name = Name
        List.Add(Project)
    End Sub
    ''' <summary>
    ''' 删除集合
    ''' </summary>
    ''' <param name="index"></param>
    ''' <remarks></remarks>
    Public Sub Remove(ByVal index As Integer)
        ' Check to see if there is a widget at the supplied index.
        If index > Count - 1 Or index < 0 Then
            ' If no widget exists, a messagebox is shown and the operation is 
            ' cancelled.
            System.Windows.Forms.MessageBox.Show("Index not valid!")
        Else
            ' Invokes the RemoveAt method of the List object.
            List.RemoveAt(index)
        End If
    End Sub

    Public Property Item(ByVal index As Integer) As Project
        Get
            Return CType(List.Item(index), Project)
        End Get
        Set(ByVal value As Project)
            List.Item(index) = value
        End Set
    End Property


End Class
